1. Field of the Invention
The present invention relates to a microcomputer having two kinds of timer functions incorporated into a single chip.
2. Description of the Related Art
A single chip (or one-chip) microcomputer includes not only a central processing unit (CPU), but also a random access memory (RAM), a read-only memory (ROM), and other peripheral circuits which include an interrupt controller, a direct memory access (DMA) controller, a serial interface, and a timer, to thereby carry out various functions.
On the other hand, for example, in a current control system for printheads, two kinds of timer outputs may be required. In this case, only when one of the timer outputs is being set, can the other be set and reset.
In the prior art, since each single chip microcomputer has only one timer function, two single chip microcomputers are provided to generate the above-mentioned two kinds of timer outputs, thus increasing the cost. Also in this case, in order to maintain the above-mentioned relationship between the two timer outputs, one of the microcomputers has to generate interrupt signals and transmit them to the other, which creates a time lag in operation between the two microcomputers, i.e., between the two timer outputs. As a result, an accurate phase relationship between the two timer outputs can not be expected due to this timer lag, which will be explained in more detail.
Also, another external timer circuit may be connected to a single chip microcomputer, thereby obtaining two kinds of timer functions. However, in this case also, since controlling the external timer circuit by using the microcomputer is complex, an accurate phase relationship between the two timer outputs can not be expected, similar to the above-mentioned two microcomputer system.